<?/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
?>
<?
$sql="SELECT name FROM server_category WHERE ID='".$_REQUEST["catID"]."'";
$catInfo=mysql_fetch_array(run_mysql_query($sql));

?>

<p>Delaying All Servers In Category: <b><?=$catInfo["name"];?></b><br>
<i>Note: ONLY Servers which are currently set to ENABLED will be delayed.</i></p>

<form method="post" action="/server/query_server.php">

<table border="0" cellpadding="5" cellspacing="1" width="700" class="formtable">
<tr valign="top">
	<td class="formfielddesc">Affected Servers:</td>
	<td class="formfield">
	
	<?
    
    $aCriteria = array(
        "active" => 1,
        "catID" => $_REQUEST["catID"]
        );
        
    $aServers = $BigDaddyData->GetServers($aCriteria);
	
    if (is_array($aServers["aResults"]))
    {
        foreach ($aServers["aResults"] as $nIndex => $row)
        {
        ?>
            <?=$row["hostname"]."<br />";?>
        <?
        
        }
    }
	
	?>
	</td>
</tr>
<td class="formfielddesc">Start Server Monitoring After:</td>
<td>

<?
	create_dateselect("dayselect", "monthselect", "yearselect", 99, 1, "hourselect", "minuteselect");
?>

</td>


<tr valign="top">

	<td class="formfielddesc" colspan="2">
	<div align="center">
		<input type="hidden" name="action" value="delayserverall" />
		<input type="hidden" name="catID" value="<?=$_REQUEST["catID"];?>" />
		<input type="submit" value="Set Delay on this Category" name="submit" class="submitbutton" />
	</div>
	
	</td>
</tr>
</table>

<br />



</form>
